home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / PowerPlant / PP Balloon Help Support / CHelpAttach.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  2.2 KB  |  78 lines  |  [TEXT/CWIE]

  1. // Header for CHelpAttach class
  2.  
  3. #pragma once
  4.  
  5. #include <LAttachment.h>
  6.  
  7. // Consts
  8.  
  9. // Panes
  10.  
  11. // Messages
  12.  
  13. const MessageT    msg_ShowHelp = 0x4000;
  14.  
  15. // Resources
  16.  
  17. // Classes
  18.  
  19. class LPane;
  20.  
  21. class CHelpAttach : public LAttachment {
  22.  
  23. protected:
  24.     Boolean            mHasBalloonHelp;            // Flag for Gestalt
  25.     short            mStrId;                        // Id for STR# rsrc
  26.     short            mIndex;                        // Index for balloon help text
  27.     short            mCurrentIndex;                // Index of current balloon
  28.     static LPane*    sHelpPane;                    // Last help pane
  29.  
  30. public:
  31.     enum { class_ID = 'Help' };
  32.     static    CHelpAttach*    CreateHelpAttachStream(LStream *inStream);
  33.     
  34.                     CHelpAttach(short strId, short index);
  35.                     CHelpAttach(LStream *inStream);
  36.     
  37. protected:
  38.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);                    // Show help balloon
  39.     virtual    void    FillHMRecord(HMMessageRecord &theHelpMsg, void *ioParam);        // Fill in the HMMessageRecord
  40.     virtual Boolean    SameBalloon(void *ioParam);                                        // Will display same balloon?
  41.  
  42. };
  43.  
  44. class CHelpPaneAttach : public CHelpAttach {
  45.  
  46. protected:
  47.     short            mEnabledIndex;                    // Index for enabled pane balloon help text
  48.     short            mDisabledIndex;                    // Index for disabled pane balloon help text
  49.  
  50. public:
  51.     enum { class_ID = 'PHlp' };
  52.     static    CHelpPaneAttach*    CreateHelpPaneAttachStream(LStream *inStream);
  53.     
  54.                     CHelpPaneAttach(short strId, short index_enabled, short index_disabled);
  55.                     CHelpPaneAttach(LStream *inStream);
  56.     
  57. protected:
  58.     virtual    void    FillHMRecord(HMMessageRecord &theHelpMsg, void *ioParam);        // Fill in the HMMessageRecord
  59.  
  60. };
  61. class CHelpControlAttach : public CHelpAttach {
  62.  
  63. protected:
  64.     short            mEnabledOnIndex;                // Index of balloon help text for enabled control on
  65.     short            mEnabledOffIndex;                // Index of balloon help text for enabled control off
  66.     short            mDisabledIndex;                    // Index of balloon help text for disabled control
  67.  
  68. public:
  69.     enum { class_ID = 'CHlp' };
  70.     static    CHelpControlAttach*    CreateHelpControlAttachStream(LStream *inStream);
  71.     
  72.                     CHelpControlAttach(short strId, short index_enabled_on, short index_enabled_off, short index_disabled);
  73.                     CHelpControlAttach(LStream *inStream);
  74.     
  75. protected:
  76.     virtual    void    FillHMRecord(HMMessageRecord &theHelpMsg, void *ioParam);        // Fill in the HMMessageRecord
  77.  
  78. };